/**
 * Created by hui on 2014/10/4.
 */

var input = document.getElementsByClassName("annoce_con")[0];

function ulShow(){

    var div = input.getElementsByClassName("people_choose")[0];
    var ul = input.getElementsByTagName("ul")[0];

    if(addEventListener){
        div.addEventListener('click',function(){

            if(ul.style.display == 'block'){
                ul.style.display = 'none';
            }
            else{
                ul.style.display = "block";
            }

        },false)
    }
    else{
        div.attachEvent('click',function(){
            if(ul.style.display == 'block'){
                ul.style.display = 'none';
            }
            else{
                ul.style.display = "block";
            }
        })
    }
}



function addLoadEvent(func){               //共享onload事件
    var oldonload = window.onload;
    if(typeof window.onload != 'function'){
        window.onload = func;
    }else{
        window.onload = function(){
            oldonload();
            func();
        }
    }
}

addLoadEvent(ulShow);